package com.example.a2207_zh.net

import com.example.a2207_zh.entity.*
import com.example.a2207_zh.utils.ConsUtils
import okhttp3.RequestBody
import retrofit2.http.Body
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.Query

interface ApiServer {
    @POST(ConsUtils.LOGIN_IRL)
    suspend fun login(@Body body:RequestBody):LoginEntityResult
    @POST(ConsUtils.REGISTER_URL)
    suspend fun register(@Body body: RequestBody):LoginEntityResult
    @GET(ConsUtils.VIDEO_URL)
    suspend fun video(@Query("currentPage")currentPage:Int,@Query("pageSize")pageSize:Int):VideoEntityResult
    @POST(ConsUtils.LOVE_URL)
    suspend fun love(@Query("videoId")videoId:Int):LoveResult
    @POST(ConsUtils.NOLOVE_URL)
    suspend fun nolove(@Query("videoId")videoId:Int):LoveResult

    @GET(ConsUtils.GIFT_URL)
    suspend fun gift():GiftEntityResult

    @GET(ConsUtils.ROOM_URL)
    suspend fun room():RoomEntityResult
}